package com.spzx.channel.controller;

import com.spzx.channel.service.IIndexService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author ChenXing
 * @Description
 * @Create 2024/8/7 18:30
 */

@RestController
@RequestMapping("/index")
public class indexController extends BaseController {

    @Autowired
    private IIndexService indexService;

    @GetMapping
    public AjaxResult index(){

        // 这里需要其他服务的数据(productSkuList,categoryList)，所以在这进行远程调用,使用 map 集合

        Map<String,Object> map = indexService.getindexData();

        return success(map);
    }




}
